import os

def read_jsp_update():
    with open('{0}\\templet_update_insert.jsp'.format(os.path.split(os.path.realpath(__file__))[0]), 'r') as f:
        result = f.read().replace("submitform","提交")
    return result

def read_jsp_insert():
    with open('{0}\\templet_update_insert.jsp'.format(os.path.split(os.path.realpath(__file__))[0]), 'r') as f:
        result = f.read().replace("submitform","提交")
    return result

def read_java_dao():
    with open('{0}\\templet_dao.java'.format(os.path.split(os.path.realpath(__file__))[0]), 'r') as f:
        result = f.read()
    return result

def read_java_service():
    with open('{0}\\templet_service.java'.format(os.path.split(os.path.realpath(__file__))[0]), 'r') as f:
        result = f.read()
    return result

def read_java_service_impl():
    with open('{0}\\templet_service_impl.java'.format(os.path.split(os.path.realpath(__file__))[0]), 'r') as f:
        result = f.read()
    return result

def read_java_controller():
    with open('{0}\\templet_controller.java'.format(os.path.split(os.path.realpath(__file__))[0]), 'r') as f:
        result = f.read()
    return result

def read_java_entity():
    with open('{0}\\templet_entity.java'.format(os.path.split(os.path.realpath(__file__))[0]), 'r') as f:
        result = f.read()
    return result

def read_xml_mapper():
    with open('{0}\\templet_mapper.xml'.format(os.path.split(os.path.realpath(__file__))[0]), 'r') as f:
        result = f.read()
    return result

if __name__=="__main__":
    print(read_java_dao())